<% if gems.respond_to?(:response) && aggregations = gems.response['aggregations'] %>
  <div class="aggregations">
    <%= t('searches.show.filter') if not_empty?(gems.response) %>
    <%= aggregation_match_count aggregations['matched_field'], 'name' %>
    <%= aggregation_match_count aggregations['matched_field'], 'description' %>
    <%= aggregation_match_count aggregations['matched_field'], 'summary' %>
    <%= aggregation_count aggregations['date_range'], 7.days, 1 %>
    <%= aggregation_count aggregations['date_range'], 30.days, 0 %>
    <%= aggregation_yanked @yanked_gem %>
  </div>
<% end %>
